package dbtek;

import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout;

import javax.swing.*;

/**
 * @author Mikko Puustinen (mikko.puustinen@gmail.com)
 * @version 0.1, Mar 4, 2008
 */
public class MainWindow {
    private JPanel panel1;
    private JComboBox comboBox1;
    private JTextField quickAddTextField;
    private JTextField searchTextField;

    private void createUIComponents() {
        // TODO: place custom component creation code here 
    }

    {
// GUI initializer generated by IntelliJ IDEA GUI Designer
// >>> IMPORTANT!! <<<
// DO NOT EDIT OR ADD ANY CODE HERE!
        $$$setupUI$$$();
    }

    /**
     * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT
     * edit this method OR call it in your code!
     */
    private void $$$setupUI$$$() {
        panel1 = new JPanel();
        panel1.setLayout(new FormLayout("fill:d:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:d:grow", "center:d:noGrow"));
        comboBox1 = new JComboBox();
        final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();
        defaultComboBoxModel1.addElement("All");
        defaultComboBoxModel1.addElement("ISBN");
        defaultComboBoxModel1.addElement("Title");
        defaultComboBoxModel1.addElement("Publisher");
        defaultComboBoxModel1.addElement("Author");
        comboBox1.setModel(defaultComboBoxModel1);
        comboBox1.setToolTipText("Search for the specified type");
        CellConstraints cc = new CellConstraints();
        panel1.add(comboBox1, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
        quickAddTextField = new JTextField();
        quickAddTextField.setText("Quick-add");
        quickAddTextField.setToolTipText("Enter the ISBN to add a book");
        panel1.add(quickAddTextField, cc.xy(5, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
        searchTextField = new JTextField();
        searchTextField.setText("Search");
        searchTextField.setToolTipText("Enter ISBN, title, or publisher");
        panel1.add(searchTextField, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
    }

    /** @noinspection ALL */
    public JComponent $$$getRootComponent$$$() {
        return panel1;
    }
}
